/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.swta;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.resources.StyleSheetReference;
import org.apache.wicket.model.PropertyModel;

/**
 *
 * @author JKorreck
 */
public class Page2 extends WebPage {

    private String message = "";

    

    public Page2() {


        add(new Label("title", "Page2 Title"));
        add(new StyleSheetReference("stylesheet", Page1.class, "style.css"));

        PropertyModel messageModel = new PropertyModel(this, "message");
        // The label displays the currently set message
        add(new Label("msg", messageModel));

        // Add a form to change the message. We don't need to do anything
        // else with this form as the shared model is automatically updated
        // on form submits
        Form form = new Form("form");

        form.add(new TextField("msgInput", messageModel));
        add(form);
    }

    /**
     * @return the message
     */
    public String getMessage() {
        return message;
    }

    /**
     * @param message
     *            the message to set
     */
    public void setMessage(String message) {
        this.message = message;
    }
}
